package org.epam.szhuk.greenway.customview;


import android.content.Context;
import android.util.AttributeSet;

import com.google.android.maps.MapView;

public class CustomMapView extends MapView {
	static final String TAG="CustomMapView";
	 private MapSizeChangedListener mListener;
	 
	 public CustomMapView(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
     }

     public CustomMapView(Context context, String apiKey) {
         super(context, apiKey);
     }

     public CustomMapView(Context context, AttributeSet attrs) {
         super(context, attrs);
     }
     
     @Override
     public void onSizeChanged(int w, int h, int oldw, int oldh){
    	 super.onSizeChanged(w, h, oldw, oldh);
    	 if (mListener != null) {
             mListener.onSizeChanged(w, h, oldw, oldh);
         }
    	 
     }
     
     public void setMapSizeChangedListener(MapSizeChangedListener mapSizeChangedListener){
    	 this.mListener=mapSizeChangedListener;
     }
     
     public interface MapSizeChangedListener {
    	 void onSizeChanged(int w, int h, int oldw, int oldh);
     }

}
